package app.controllers;

import app.enums.GenreCode;
import app.enums.PublicationTypeCode;
import app.services.PublicationTypeService;
import com.google.inject.Inject;
import java.util.List;
import java.util.Map;
import org.javalite.activeweb.AppController;

/**
 *
 * @author Kseniya Artsiukhova <kartsiukhova@productiveedge.com>
 */
public class PublicationTypeController extends AppController {

    private PublicationTypeService publicationTypeService;

    public void index() {
    }

    public void list() {
        Map<PublicationTypeCode, List<GenreCode>> map = publicationTypeService.publicationTypeListWithGenres();
        view("elements", map);
    }

    @Inject(optional = false)
    public void setPublicationTypeService(PublicationTypeService publicationTypeService) {
        this.publicationTypeService = publicationTypeService;
    }
}
